package cn.imu.impl;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Director {

    @Test
    public void direct() {
        // 创建工程
        ApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("bean2.xml");
        // 获得到对应XML当中的对象
        MoAttack moAttack= (MoAttack) applicationContext.getBean("moAttack2");

       System.out.println(moAttack);
       moAttack.cityGateAsk();
    }
}
